import service from "@/utils/request";
import type { Response, PageResponse } from "@/types/common";
import type { WalletCategoryItem } from "@/types/pos/walletCategory/index";
export const usePosWalletCategoryPageApi = (params: object) => {
  return service<any, Response<PageResponse<WalletCategoryItem>>>({
    url: `/v1/pos/walletCategory/page`,
    method: "GET",
    params,
  });
};

export const usePosWalletCategoryQueryApi = (params: object) => {
  return service<any, Response<WalletCategoryItem>>({
    url: `/v1/pos/walletCategory/query`,
    method: "GET",
    params,
  });
};

export const usePosWalletCategoryListApi = () => {
  return service<any, Response<WalletCategoryItem>>({
    url: `/v1/pos/walletCategory/list`,
    method: "GET",
  });
};

export const usePosWalletCategoryCreateApi = (data: object) => {
  return service({
    url: `/v1/pos/walletCategory/create`,
    method: "POST",
    data,
  });
};

export const usePosWalletCategoryUpdateApi = (data: object) => {
  return service({
    url: `/v1/pos/walletCategory/update`,
    method: "POST",
    data,
  });
};

export const usePosWalletCategoryDeleteApi = (data: object) => {
  return service({
    url: `/v1/pos/walletCategory/delete`,
    method: "DELETE",
    data,
  });
};
